import request from '@/utils/request'

// 查询库存列表
export function listStock(query) {
  return request({
    url: '/ich/stock/list',
    method: 'get',
    params: query
  })
}

// 获取商品库存详情
export function getStock(productId) {
  return request({
    url: '/ich/stock/' + productId,
    method: 'get'
  })
}

// 更新预警库存
export function updateWarningStock(data) {
  return request({
    url: '/ich/stock/warning',
    method: 'put',
    data: data
  })
}

// 批量更新预警库存
export function updateWarningStockBatch(data) {
  return request({
    url: '/ich/stock/warning/batch',
    method: 'put',
    data: data
  })
} 